How to make this multiple conditional if else block into shorter syntax - javascript

visit shbcf.ru